//
//  ViewControllerExt.swift
//  kano
//
//  Created by Frank on 2024/8/28.
//

import UIKit

extension UIViewController {
    class func topViewController() -> UIViewController? {
        var topController = UIApplication.shared.keyWindow?.rootViewController
        while let presentedController = topController?.presentedViewController {
            topController = presentedController
        }
        return topController
    }
}

